import request from '@/utils/request1'

// 查询pos列表
export function listMaterial(query) {
  return request({
    url: '/system/pos/material/list',
    method: 'get',
    params: query
  })
}

// 查询pos详细
export function getMaterial(id) {
  return request({
    url: '/system/pos/material/' + id,
    method: 'get'
  })
}

// 新增pos
export function addMaterial(data) {
  return request({
    url: '/system/pos/material',
    method: 'post',
    data: data
  })
}

// 修改pos
export function updateMaterial(data) {
  return request({
    url: '/system/pos/material',
    method: 'put',
    data: data
  })
}

// 删除pos
export function delMaterial(id) {
  return request({
    url: '/system/pos/material/' + id,
    method: 'delete'
  })
}

// 导出pos
export function exportMaterial(query) {
  return request({
    url: '/system/pos/material/export',
    method: 'get',
    params: query
  })
}